package ControlLayer;
import ModelLayer.*;
import java.util.ArrayList;

public class ProductCtr
{
    private ProductContainer productList;

    public ProductCtr()  //recives the list from the ProductContainer, and if there aren't any, creates a new one
    {
        productList = ProductContainer.getInstance();
    }

    public void findProduct(String productName)  //used to find product(s) in the list
    {
        productList.findProduct(productName);
    }
    
    public PartOrder getProduct(int productId, int amount) //used to get a product in the list and return it
    {
        PartOrder pO = productList.getProduct(productId, amount);
        return pO;
    }    
    
    public void addSerialnumber(long productId, long serialnumber)  //used to add a serial
    {
        productList.addSerialnumber(productId, serialnumber);
    }
}
